﻿using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Expression;
using Castle.ActiveRecord;

namespace Mang24k99.Model.COMM
{
    [ActiveRecord(Table = "KT_COMM_CODETYPE_History")]
    public partial class MKtCommCodetypeHistory : ActiveRecordBase
    {
        public static IList<MKtCommCodetypeHistory> SelectAll()
        {
            return (IList<MKtCommCodetypeHistory>)FindAll(typeof(MKtCommCodetypeHistory));
        }
        public static MKtCommCodetypeHistory SelectByPrimaryKey(object ID)
        {
            return (MKtCommCodetypeHistory)FindByPrimaryKey(typeof(MKtCommCodetypeHistory), ID);
        }
        public static IList<MKtCommCodetypeHistory> SelectALLByProperty(string property, object value)
        {
            return (IList<MKtCommCodetypeHistory>)FindAllByProperty(typeof(MKtCommCodetypeHistory), property, value);
        }
        public static IList<MKtCommCodetypeHistory> SelectALLSliced(int firstResult, int maxResult, NHibernate.Expression.DetachedCriteria criteria)
        {

            return (IList<MKtCommCodetypeHistory>)SlicedFindAll(typeof(MKtCommCodetypeHistory), firstResult, maxResult, criteria);
        }



        #region Model

        private int _id;
        private int? _type_code;
        private string _type_name;
        private int? _type_spec;
        private string _type_remark;
        private int? _is_validate;
        private DateTime? _input_time;
        private DateTime? _modify_time;
        private DateTime? _delete_time;

        /// <summary>
        /// 自增ID
        /// </summary>
        [PrimaryKey(PrimaryKeyType.Native, "ID")]
        public int ID
        {
            set { _id = value; }
            get { return _id; }
        }

        /// <summary>
        /// 主键类型编码
        /// </summary>
        [Property("TYPE_CODE")]
        public int? TYPE_CODE
        {
            set { _type_code = value; }
            get { return _type_code; }
        }

        /// <summary>
        ///类型名称 
        /// </summary>
        [Property("TYPE_NAME")]
        public string TYPE_NAME
        {
            set { _type_name = value; }
            get { return _type_name; }
        }

        /// <summary>
        /// 编码分类
        /// </summary>
        [Property("TYPE_SPEC")]
        public int? TYPE_SPEC
        {
            set { _type_spec = value; }
            get { return _type_spec; }
        }

        /// <summary>
        /// 备注
        /// </summary>
        [Property("TYPE_REMARK")]
        public string TYPE_REMARK
        {
            set { _type_remark = value; }
            get { return _type_remark; }
        }

        /// <summary>
        /// 是否有效
        /// </summary>
        [Property("IS_VALIDATE")]
        public int? IS_VALIDATE
        {
            set { _is_validate = value; }
            get { return _is_validate; }
        }

        /// <summary>
        /// 输入时间
        /// </summary>
        [Property("INPUT_TIME")]
        public DateTime? INPUT_TIME
        {
            set { _input_time = value; }
            get { return _input_time; }
        }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Property("MODIFY_TIME")]
        public DateTime? MODIFY_TIME
        {
            set { _modify_time = value; }
            get { return _modify_time; }
        }

        /// <summary>
        /// 删除时间
        /// </summary>
        [Property("DELETE_TIME")]
        public DateTime? DELETE_TIME
        {
            set { _delete_time = value; }
            get { return _delete_time; }
        }

        #endregion Model

    }
}
